package com.ms.exmaple.orm.mapper;

import com.ms.exmaple.orm.entity.User;
import com.ms.orm.annotation.LittleOrmRepository;
import com.ms.orm.annotation.Param;
import com.ms.orm.mapper.Mapper;
import com.ms.orm.meta.IPage;

import java.util.List;

/**
 * @author zdh
 */
@LittleOrmRepository
public interface UserMapper extends Mapper {

    /**
     * 根据条件查询
     * @param name
     * @param age
     * @return
     */
    List<User> selectUsersWithConditions(@Param("name") String name, @Param("age") Integer age);

    /**
     *
     * @param page
     * @param name
     * @param age
     * @return
     */
    IPage<User> selectUsersWithConditionPage(@Param("page")IPage<User> page, @Param("name") String name, @Param("age") Integer age);
}
